package com.chengfei.thread.demo1;

/**
 * 集成Runnable接口的时候并不是创建一个线程，而是作为一个线程任务存在
 *
 * @author chengfei5
 * @date 2019/1/3
 */
public class NewThread2 implements Runnable {
    @Override
    public void run() {
        while (true) {
            System.out.println("thread running");
        }
    }

    public static void main(String[] args) {
        NewThread2 newThread2 = new NewThread2();
        Thread thread = new Thread(newThread2);

        thread.start();
    }
}
